﻿Public Class SystemHelper
    Public Shared Function GetTimeZones() As Dictionary(Of String, String)

        Dim timezones As New Dictionary(Of String, String)

        For Each tz In TimeZoneInfo.GetSystemTimeZones()
            timezones.Add(tz.Id, tz.DisplayName)
        Next

        Return timezones
    End Function

    Public Shared Function GetTimeZoneList() As IEnumerable(Of TimeZoneInfo)
        Return TimeZoneInfo.GetSystemTimeZones()
    End Function

    Public Shared Function IsWeekendNow() As Boolean
        Return DateTime.UtcNow.DayOfWeek = DayOfWeek.Saturday Or DateTime.UtcNow.DayOfWeek = DayOfWeek.Sunday
    End Function

    Public Shared Function IsSundayNow() As Boolean
        Return DateTime.UtcNow.DayOfWeek = DayOfWeek.Sunday
    End Function

    Public Shared Function IsSaturdayNow() As Boolean
        Return DateTime.UtcNow.DayOfWeek = DayOfWeek.Saturday
    End Function

End Class
